From 33617d2daa37994a72167b76c9f22440a9eb1424 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Tue, 11 Dec 2012 18:52:02 +0000 Subject: [PATCH] Lowrance: fix memory corruption on read of empty route description. --- gpsbabel/lowranceusr4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpsbabel/lowranceusr4.c b/gpsbabel/lowranceusr4.c index 7c00c01fe..a0c7520fa 100644 --- a/gpsbabel/lowranceusr4.c +++ b/gpsbabel/lowranceusr4.c @@ -656,7 +656,7 @@ lowranceusr4_parse_trails(void) text_len = lowranceusr4_readstr(&buff[0], MAXUSRSTRINGSIZE, file_in, 2); if (text_len) { buff[text_len] = '\0'; - trk_head->rte_desc = buff; + trk_head->rte_desc = xstrdup(buff); } /* Creation date/time, discard for now */ -- 2.30.2